import http from "@/http"
import {ImplementationItem, softwarePlan,softwarePlanListParam} from '@/api/softwarePricingPlan/type.ts'
// 根据仓库id,数量，项目金额查询价格明细
export const getDetailApi = (warehouseId:number, num:number, money:number) =>{
    return http.get("/softwarePricingPlan/getDetail", {
        warehouseId,num,money
    })
}

// 软件核价单分页列表查询
export const querySoftwarePlanListApi = (data: softwarePlanListParam) => {
    return http.get("/softwarePricingPlan/querySoftwarePlanList", data)
}

// 软件核价单删除接口
export const deleteApi = (id:number) => {
    return http.delete("/softwarePricingPlan/deleteSoftwarePricingPlan/"+id)
}

// 保存软件报价单
export const submitSoftwarePricingPlanApi = (data: softwarePlan) => {
    return http.post("/softwarePricingPlan/saveSoftwarePlan", data)
}

// 修改软件报价单
export const submitUpdateSoftwarePlan = (data: softwarePlan) => {
    return http.put("/softwarePricingPlan/updateSoftwarePlan", data)
}

// 查询软件报价单详情
export const getSoftwarePlanApi = (id:string) => {
    return http.get("/softwarePricingPlan/getSoftwarePlan/"+id)
}

// 删除软件核价方案
export const deleteSoftwarePricingPlan = (id: number) => {
  return http.delete('/softwarePricingPlan/deleteSoftwarePricingPlan/' + id)
}

// 更新软件核价状态
export const updateStatusApi = (params: { id: number; activate: number }) => {
  return http.put('/softwarePricingPlan/updateStatus', params)
}
